<?php
    include('../config.php');
    
    $sql = "select * from shop";   //查询表单的所有数据
    $res = mysql_query($sql);   //资源数据类型
    $list = array();

    while($row = mysql_fetch_assoc($res)){
        array_push($list,$row);   //把每一天数据都加到数组里
    }

    $arr = array(    //按照接口文档返回数据
        "code" => 200,
        "body" => array(
            "msg" => "查询成功，你真棒",
            "list" => $list
        )
    );

    echo json_encode($arr)   //php返回给浏览器的格式
?>
